<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    body{
      height: 100vh;
      overflow: hidden;
    }
    .container{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: url("../images/12.jpg") no-repeat;
      background-size: cover;
      background-position: center center;
      animation: animateBg 5s linear infinite;
    }
    span{
      position: absolute;
      top: 50%;
      left: 50%;
      width: 4px;
      height: 4px;
      background-color: #fff;
      border-radius: 50%;
      /* 发光效果 */
      box-shadow: 0 0 0 4px rgba(255,255,255,0.1),
      0 0 0 8px rgba(255,255,255,0.1),
      0 0 20px rgba(255,255,255,1);
      animation: animate 3s linear infinite;
    }
    span::before{
      content: "";
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 200px;
      height: 3px;
      /* 渐变轴为90度（相当于线段中间），从白色渐变到透明 */
      background: linear-gradient(90deg,#fff,transparent);
    }
    /* 为每一个流星设置位置，动画延迟时间，动画时长 */
    span:nth-child(1){
      top: 0;
      right: 0;
      /* initial用于设置属性值为默认值 */
      left: initial;
      animation-delay: 0s;
      /* 动画时长 */
      animation-duration: 1s;
    }
    span:nth-child(2){
      top: 0;
      right: 80px;
      left: initial;
      animation-delay: 0.4s;
      animation-duration: 2s;
    }
    span:nth-child(3){
      top: 80px;
      right: 0;
      left: initial;
      animation-delay: 0.2s;
      animation-duration: 3s;
    }
    span:nth-child(4){
      top: 0;
      right: 1800px;
      left: initial;
      animation-delay: 0.6s;
      animation-duration: 1.5s;
    }
    span:nth-child(5){
      top: 0;
      right:400px;
      left: initial;
      animation-delay: 0.8s;
      animation-duration: 2.5s;
    }
    span:nth-child(6){
      top: 0;
      right: 600px;
      left: initial;
      animation-delay: 1s;
      animation-duration: 3s;
    }
    span:nth-child(7){
      top: 300px;
      right: 0;
      left: initial;
      animation-delay: 1.2s;
      animation-duration: 1.75s;
    }
    span:nth-child(8){
      top: 0;
      right: 700px;
      left: initial;
      animation-delay: 1.4s;
      animation-duration: 1.25s;
    }
    span:nth-child(9){
      top: 0;
      right: 1000px;
      left: initial;
      animation-delay: 0.75s;
      animation-duration: 2.25s;
    }
    span:nth-child(10){
      top: 0;
      right: 450px;
      left: initial;
      animation-delay: 2.75s;
      animation-duration: 2.25s;
    }
    @keyframes animateBg {
      0%,100%{
        transform: scale(1);
      }
      50%{
        transform: scale(1.01);
      }
    }
    /* 流星动画 :旋转315度，向该方向X轴移动300px*/
    @keyframes animate {
      0%{
        transform: rotate(315deg) translateX(0);
        opacity: 1;
      }
      90%{
        opacity: 1;
      }
      100%{
        transform: rotate(315deg) translateX(-400px);
        opacity: 0;
      }
    }
  </style>
</head>
<body>
  <div class="container">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</body>
</html>